/****************************************************************************

Force Engine v0.5

Creado: 28/03/08
Clase: MyScene.h
Hecho by: German Battiston AKA Melkor

****************************************************************************/

//---------------------------------------------------------------------------
#ifndef MY_SCENE_H
#define MY_SCENE_H
//---------------------------------------------------------------------------
#include "../Src/Force Engine/Defines/Defines.h"
#include "../Src/Force Engine/Force Engine/ForceEngine.h"
#include "../Src/Force Engine/Utilities/DrawUtilities.h"
#include "cg/cg.h"
#include "cg/cgD3D9.h"
//---------------------------------------------------------------------------
class MyScene : public Scene
{
public:

	MyScene(Graphics &rkGraphics);
	virtual ~MyScene();

	bool OnInit();
	bool OnUpdate(float fTimeBetweenFrames);
	void OnDraw();
	bool OnDeInit();

private:

	void CreatePlane();

	Mesh *m_pkMesh;

	Camera *m_pkCamera;

	Graphics *m_pkGraphics;

	char *m_pszProgram;

	CGcontext m_kContext;
	CGprogram m_kCgProgram;
	
	LPDIRECT3DTEXTURE9 m_pkRenderTexture;

	LPDIRECT3DSURFACE9 m_pkBackBuffer;
	LPDIRECT3DSURFACE9 m_pkRenderSurface;

	D3DXMATRIX m_kViewMat;
	D3DXMATRIX m_kWorldMat;
	D3DXMATRIX m_kProjectionMat;
	D3DXMATRIX m_kPerspectiveMat;

	D3DXMATRIX m_kOldViewMat;
	D3DXMATRIX m_kOldWorldMat;
	D3DXMATRIX m_kOldProjectionMat;

	LPDIRECT3DVERTEXBUFFER9 m_VertexBuffer;
	TextureVertex m_pkTexVertexPoligon[4];

	D3DXMATRIX	WorldViewProjection;
	D3DXVECTOR4 Color;
};

//---------------------------------------------------------------------------

#endif /*--- MY_SCENE_H ---*/

//---------------------------------------------------------------------------
